package com.zd.lwsq.mapper;

import java.util.List;
import com.zd.lwsq.domain.ApplicationInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * 离乌申请数据Mapper接口
 * 
 * @author fxiao
 * @date 2020-08-07
 */
@Mapper
public interface ApplicationInfoMapper 
{
    /**
     * 查询离乌申请数据
     * 
     * @param id 离乌申请数据ID
     * @return 离乌申请数据
     */
    public ApplicationInfo selectApplicationInfoById(String id);

    /**
     * 查询离乌申请数据列表
     * 
     * @param applicationInfo 离乌申请数据
     * @return 离乌申请数据集合
     */
    public List<ApplicationInfo> selectApplicationInfoList(ApplicationInfo applicationInfo);

    /**
     * 新增离乌申请数据
     * 
     * @param applicationInfo 离乌申请数据
     * @return 结果
     */
    public int insertApplicationInfo(ApplicationInfo applicationInfo);

    /**
     * 修改离乌申请数据
     * 
     * @param applicationInfo 离乌申请数据
     * @return 结果
     */
    public int updateApplicationInfo(ApplicationInfo applicationInfo);

    /**
     * 删除离乌申请数据
     * 
     * @param id 离乌申请数据ID
     * @return 结果
     */
    public int deleteApplicationInfoById(String id);

    /**
     * 批量删除离乌申请数据
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteApplicationInfoByIds(String[] ids);

    @Select("select * from application_info where sjhm=#{tel} limit 0,1")
    ApplicationInfo selectApplicationInfoByTel(@Param("tel") String tel);

    @Select("select *,skjc_rq skjcRq,hsjc_rq hsjcRq,sq_name sqName, sq_code sqCode,create_datetime createDatetime  from application_info where zjhm=#{id} limit 0,1")
    ApplicationInfo selectApplicationInfoByCardId(@Param("id") String id);
    /*List<ApplicationInfo> selectBySqIds(List<Long> sqIds);*/

}
